#ifndef _Table_h_
#define _Table_h_

#include <string>

#import "C:\Windows\winsxs\x86_microsoft-windows-m..ents-mdac-ado15-dll_31bf3856ad364e35_6.1.7600.20818_none_0cdf8d5eeadc631b\msado15.dll" rename( "EOF", "EndOfFile" )

typedef ADODB::_RecordsetPtr  RecPtr;
typedef ADODB::_ConnectionPtr CnnPtr;


class Table{
public:
	RecPtr m_Rec;
	char m_ErrStr[500];
	Table();
	void GetErrorErrStr(char* ErrStr);
	int ISEOF();
	HRESULT MoveNext();
	HRESULT MovePrevious();
	HRESULT MoveFirst();
	HRESULT MoveLast();
	int AddNew();
	int Update();
	int Add(char* FieldName, char* FieldValue);
	int Add(char* FieldName,int FieldValue);
	int Add(char* FieldName,float FieldValue);
	int Add(char* FieldName,double FieldValue);
	int Add(char* FieldName,long FieldValue);
	bool Get(char* FieldName, char* FieldValue);
	bool Get(char* FieldName, std::string& FieldValue);

	bool Get(char* FieldName,int& FieldValue);
	bool Get(char* FieldName,float& FieldValue);
	bool Get(char* FieldName,double& FieldValue);
	bool Get(char* FieldName,double& FieldValue,int Scale);
	bool Get(char* FieldName,long& FieldValue);
};

#endif